import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:share_fit/app/components/back_btn_icon.dart';
import 'package:share_fit/app/helper/ext/tr_ext.dart';
import 'package:share_fit/app/tools/color_const.dart';
import 'package:share_fit/generated/locales.g.dart';

import 'logic.dart';

class QuestionDetailPage extends StatelessWidget {
  QuestionDetailPage({Key? key}) : super(key: key);

  final logic = Get.put(QuestionLogic());
  final state = Get.find<QuestionLogic>().state;

  @override
  Widget build(BuildContext context) {
    Map<String, dynamic> params = Get.arguments;
    return Scaffold(
      appBar: AppBar(
        title: Text(LocaleKeys.question.ts, style: TextStyle(fontSize: 54.sp, color: ColorConst.btnFontColor),),
        centerTitle: true,
        leading: BackBtnIcon(onTap: () => Get.back()),
        //   leading: IconButton(
        //     padding: EdgeInsets.only(left: 15,),
        //     icon: Image.asset("assets/images/space/icon_appbar_arrow_back.png"),
        //     onPressed: () { Get.back(); },
        //   ),
        //   leadingWidth: 25,
      ),
      body: SingleChildScrollView(
        child: Container(
          padding: EdgeInsets.fromLTRB(42.w, 100.h, 42.w, 240.h),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              // GestureDetector(
              //   behavior: HitTestBehavior.opaque,
              //   onTap: (){},
              //   child: Container(
              //     margin: EdgeInsets.only(top: 38.h, bottom: 82.h),
              //     padding: EdgeInsets.fromLTRB(62.w, 50.h, 56.w, 50.h),
              //     decoration: BoxDecoration(
              //         borderRadius: BorderRadius.circular(10),
              //         color: Colors.white
              //     ),
              //     child: Row(
              //       mainAxisAlignment: MainAxisAlignment.spaceBetween,
              //       children: [
              //         Text(LocaleKeys.question_tips.ts, style: TextStyle(fontSize: 42.sp, color: ColorConst.btnFontColor,)),
              //         Image(
              //             width: 36.w,
              //             height: 21.h,
              //             image: const AssetImage("assets/images/device/icon_restoration_arrow.png"))
              //       ],
              //     ),
              //   ),
              // ),
              Text(params['question'], style: TextStyle(fontSize: 54.sp, color: ColorConst.btnFontColor),),
              SizedBox(height: 58.h,),
              Text(params['answer'], style: TextStyle(fontSize: 42.sp, color: ColorConst.btnFontColor,)),
            ],
          ),),),);
  }

}
